'use strict';
let koa=require('koa');
let bodyparser=require('koa-bodyparser');
let controller=require('./controllers');
let templating=require('./templating');


let app=new koa();
app.use(bodyparser());
app.use(controller());
app.use(templating);


let name="考试考试考试！！！";
app.use(async (ctx,next)=>{
    ctx.render('hello.html',{name:name});
})

let port=3000;
app.listen(port);

console.log(`http://127.0.0.1:${port}`);